<@_sysUser id=id>
	<#assign a=object/>
	<@_sysDept id=object.deptId><#assign dept=object/></@_sysDept>
</@_sysUser>
<form method="post" action="sysDept/saveUser.do?callbackType=closeCurrent&navTabId=sysDept/userList" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
	<input name="id" type="hidden" value="${id!}" />
	<div class="formBar">
		<ul>
			<li><button type="submit" class="buttonActive">保存</button></li>
			<li><button type="button" class="button close">关闭</button></li>
		</ul>
	</div>
	<div class="pageFormContent" layoutH="60">
		<dl class="nowrap">
			<dt>用户名:</dt>
			<dd>
				<input class="required" name="name" type="text" maxlength="20" size="20" value="${(a.name)!}"/>
			</dd>
		</dl>
		<dl class="nowrap">
			<dt>所属部门:</dt>
			<dd>
				<input name="deptId" type="hidden" value="${(dept.id)!}"/>
				<input readonly="readonly" name="deptName" type="text" size="10" value="${(dept.name)!}"/>
			</dd>
		</dl>
		<dl class="nowrap">
			<dt>密码:</dt>
			<dd>
				<input<#if !a??> class="required"</#if> name="password" type="password" maxlength="30" size="20" value=""/>
				<#if a??><span class="info">留空则不更新密码</span></#if>
			</dd>
		</dl>
		<dl class="nowrap">
			<dt>重复密码:</dt>
			<dd><input<#if !a??> class="required"</#if> name="repassword" type="password" maxlength="30" size="20" value=""/></dd>
		</dl>
		<dl class="nowrap">
			<dt>用户昵称:</dt>
			<dd><input class="required" name="nickName" type="text" size="20" maxlength="30" value="${(a.nickName)!}"/></dd>
		</dl>
		<dl class="nowrap">
			<dt>邮箱:</dt>
			<dd><input name="email" type="text" size="30" maxlength="50" value="${(a.email)!}"/></dd>
		</dl>
		<fieldset>
			<legend><i class="icon-user-md icon-large"></i> 角色(只能授权您拥有得角色)</legend>
			<ul class="tree treeFolder treeCheck expand">
		<@_sysRole ids=admin.roles>
			<#list map?keys as k>
				<li><a tname="roleIds" tvalue="${map[k].id}">${map[k].name}</a></li>
			</#list>
		</@_sysRole>
			</ul>
		</fieldset>
	</div>
</form>